﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ninject.Core;
using Hotnet.Dal.NSDalNews;
using Hotnet.Entity;

namespace Hotnet.Biz.NSBizNews
{
	public class BizNewsContent : BaseBiz<NewsContent>
	{
		private static DalNewsContent dalNewsContent = new DalNewsContent();
		public BizNewsContent() : base(dalNewsContent) { }
		public NewsContent[] ListNewsContentByNewsID(int newsID)
		{
			return dalNewsContent.ListBy(x => x.NewsID == newsID);
		}

		public NewsContent Get(int newsID, int orderNo)
		{
			return dalNewsContent.GetBy(x => x.NewsID == newsID && x.OrderNo == orderNo);
		}

		public void Delete(int newsId)
		{
			dalNewsContent.DeleteBy(x=>x.NewsID==newsId);
		}

		public void Delete(int newsId, int orderNo)
		{
			dalNewsContent.DeleteBy(x => x.NewsID == newsId&&x.OrderNo==orderNo);
		}
	}
}
